import request from '@/utils/http'


// export const getDetail = (productId) => {
//   return request({
//     url: '/product/detail',
//     params: {
//       productId
//     }
//   })
// }

export const getDetail = (productId) => {
  return request.get('/product/detail', { params: { productId } })
}

export const getCommentList = (productId) => {
  return request.get('/product/comment/list',{ params: { productId } })
}

export const getHotGoodsAPI = ({ id, type, limit = 3 }) => {
  return request({
    url: '/goods/hot',
    params: {
      id,
      type,
      limit
    }
  })
}

//评论点赞
export const addCommentLikeAPI = (commentId) => {
  return request.post(`/product/comment/like?commentId=${commentId}`)
}